
<%@include file="taglibs.jsp"%>

<div id=filters class="myCustomBox">
	<div id="available_filters">

		<c:forEach var="filter" items="${actionBean.filters}">
			<div class="subfilter">
				<div id="less_filters_${filter.name}">
					<c:choose>
						<c:when test="${filter.name=='source' }">
							<h3>Source:</h3>
						</c:when>
						<c:when test="${filter.name=='entity' }">
							<h3>Entities:</h3>
						</c:when>
					</c:choose>					
					
					<c:forEach var="count" items="${filter.values}" varStatus="status"
						begin="0" end="9" step="1">

							<s:link beanclass="l3s.wikirevisions.WikiActionBean">
								<s:param name="query" value="${actionBean.query}" />
								<s:param name="addedFilter" value="${actionBean.appliedFilters }###${filter.name}:${count.name }" />
								<s:param name="fromDate" value="${actionBean.fromDate}" />
								<s:param name="toDate" value="${actionBean.toDate}" />
								
								
										${count.name }: ${count.count }										
							</s:link>
						<br />
					</c:forEach>
					<a href="#" onclick="toggle_display('more_filters_${filter.name}'); toggle_display('less_filters_${filter.name}'); return false;">
					[Show more]
					</a>
					<br>
					<br>
				</div>
				
				<div id="more_filters_${filter.name}" style="display:none;">
					<c:choose>
						<c:when test="${filter.name=='source' }">
							<h4>Source</h4>
						</c:when>
						<c:when test="${filter.name=='entity' }">
							<h4>Entities</h4>
						</c:when>
					</c:choose>					
					
					<c:forEach var="count" items="${filter.values}" varStatus="status"
						begin="0" end="40" step="1">

							<s:link beanclass="l3s.wikirevisions.WikiActionBean">
								<s:param name="query" value="${actionBean.query}" />
								<s:param name="addedFilter" value="${actionBean.appliedFilters }###${filter.name}:${count.name }" />
								<s:param name="fromDate" value="${actionBean.fromDate}" />
								<s:param name="toDate" value="${actionBean.toDate}" />
								
								
										${count.name }: ${count.count }										
							</s:link>
						<br />
					</c:forEach>
					<a href="#" onclick="toggle_display('more_filters_${filter.name}'); toggle_display('less_filters_${filter.name}'); return false;">
					[Show less]
					</a>					
					<br>
					<br>
				</div>				

			</div>
		</c:forEach>
	</div>
</div>